package com.gqz.service.impl;

import com.gqz.domain.BlogParam;
import com.gqz.mapper.BlogParamMapper;
import com.gqz.service.IBlogParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class BlogParamServiceImpl implements IBlogParamService {


    @Autowired
    private BlogParamMapper blogParamMapper;

    @Override
    public Map<String, String> getAllBlogParam() {
        List<BlogParam> list = blogParamMapper.selectAll();

        HashMap<String, String> map = new HashMap<>();
        for (BlogParam blogParam : list) {
            map.put(blogParam.getParamKey(), blogParam.getParamValue());
        }
        return map;
    }
}
